package com.javasm.mingming.task.runnable;

import com.javasm.mingming.news.service.NewsService;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author javasm
 * @version 0.1
 * @className NewTask
 * @descriptioin:
 * @date 2025/1/17 10:26
 * @since jdk11
 */
@Component
public class NewTask implements Runnable{

    Logger logger = LogManager.getLogger(NewTask.class);

    @Resource
    NewsService newsService;

    @Override
    public void run() {
        logger.info("同步新闻列表");
        newsService.syncNews();
    }
}
